﻿@page "/UCtrl1"

<h3>通信节点状态监视</h3>
<Tree ShowIcon="true" 
      ShowSkeleton="true" 
      Items="GetTreeItems2()">
</Tree>

@code {
    public static List<TreeItem> GetTreeItems()
    {
        return new List<TreeItem>() {
            new TreeItem(){ Text = "测试节点1", Icon = "fa fa-assistive-listening-systems" },
            new TreeItem(){ Text = "测试节点2", Icon = "fa fa-assistive-listening-systems" },
            new TreeItem(){ Text = "测试节点3", Icon = "fa fa-assistive-listening-systems" },
            new TreeItem(){ Text = "测试节点4", Icon = "fa fa-assistive-listening-systems" },
        };
    }

    public static List<TreeItem> GetTreeItems2()
    {
        var treeList = GetTreeItems();
        treeList[0].Items = GetTreeItems();

        return treeList;
    }
}
